<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        button{
            display: block;
            margin: 100px auto;
            text-align: center;
            position: relative;
            z-index: 1;
            width: 204px;
            height: 54px;
            border: 2px solid purple;
            color: #333;
            font-size: 20px;
            background-color: #fff;
            overflow: hidden;
        }
        i{
            position: absolute;
            left: -25px;
            top: 0;
            content: '';
            height: 54px;
            width: 254px;
            background-color:purple;
            transform-origin: left bottom;
            transform: rotate(-90deg);
            transition: all .5s;
        }
        button:hover i{
            transform: rotate(0deg);
        }
        button span{
            position: relative;
            z-index: 2;
            text-align: center;
            transition: all .3s;
        }
        button:hover span{
            color: #fff;
            z-index: 2;
        }
    </style>
</head>
<body>
        <button>
            <span>立即登录</span>
            <i></i>
        </button>
</body>
</html>